package org.ichamigua.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.ichihamigua.common.user.entity.UserUpdateAvatarLogEntity;
import org.ichihamigua.common.user.entity.UserUpdateNicknameLogEntity;

/**
 * @author zzy
 */
@Mapper
public interface UserUpdateNicknameLogMapper extends BaseMapper<UserUpdateNicknameLogEntity> {
    @Select("SELECT COUNT(*) AS count FROM ic_user_update_nickname_log as log join ic_user as u on log.userId = u.id WHERE u.id = 'userId'  AND YEAR(time) = YEAR(CURRENT_DATE) AND MONTH(time) = MONTH(CURRENT_DATE)")
    int selectNicknameByUserIds();
}
